package com.community.process._1010.common.utils.mp;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.community.process._1010.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * Created by Zbs
 * 2018-12-25
 */
@Getter
@Setter
@NoArgsConstructor
@Schema(description = "tree基础信息")
public class BaseTreeNode extends BaseEntity {

    /**
     * 级别
     */
    @Schema(description = "等级")
    private Integer level;

    /**
     * 上级ID
     */
    @Schema(description = "上级ID")
    private Long parentId;

    /**
     * 编码
     */
    @Schema(description = "编码")
    private String treeCode;


    public BaseTreeNode(Long id) {
        super.setId(id);
    }

    public BaseTreeNode(Integer level, Long parentId, String treeCode) {
        this.level = level;
        this.parentId = parentId;
        this.treeCode = treeCode;
    }

    public BaseTreeNode(Long id, Integer level, Long parentId, String treeCode) {
        super.setId(id);
        this.level = level;
        this.parentId = parentId;
        this.treeCode = treeCode;
    }
}
